package com.bolt.support.query.conditions.domain;

import java.io.Serializable;

public interface Compare<Children, R> extends Serializable {

    /**
     * 等于 =
     *
     * @param property   字段
     * @param matchValue 值
     * @return
     */
    Children eq(R property, Object matchValue);

    Children eq(SqlClause left, SqlClause right);

    /**
     * 不等于 &lt;&gt;
     *
     * @param property   字段
     * @param matchValue 值
     * @return
     */
    Children ne(R property, Object matchValue);

    Children ne(SqlClause left, SqlClause right);

    /**
     * 大于 &gt;
     *
     * @param property   字段
     * @param matchValue 值
     * @return
     */
    Children gt(R property, Object matchValue);

    Children gt(SqlClause left, SqlClause right);

    /**
     * 大于等于 &gt;=
     *
     * @param property   字段
     * @param matchValue 值
     * @return
     */
    Children ge(R property, Object matchValue);

    Children ge(SqlClause left, SqlClause right);

    /**
     * 小于 &lt;
     *
     * @param property   字段
     * @param matchValue 值
     * @return
     */
    Children lt(R property, Object matchValue);

    Children lt(SqlClause left, SqlClause right);

    /**
     * 小于等于 &lt;=
     *
     * @param property
     * @param matchValue
     * @return
     */
    Children le(R property, Object matchValue);

    Children le(SqlClause left, SqlClause right);

    /**
     * BETWEEN 值1 AND 值2
     *
     * @param property 字段
     * @param val1     值1
     * @param val2     值2
     * @return children
     */
    Children between(R property, Object val1, Object val2);


    /**
     * NOT BETWEEN 值1 AND 值2
     *
     * @param property 字段
     * @param val1     值1
     * @param val2     值2
     * @return children
     */
    Children notBetween(R property, Object val1, Object val2);


    /**
     * LIKE '%值%'
     *
     * @param property 字段
     * @param val      值
     * @return children
     */
    Children like(R property, String val);


    /**
     * NOT LIKE '%值%'
     *
     * @param property 字段
     * @param val      值
     * @return children
     */
    Children notLike(R property, String val);


    /**
     * LIKE '%值'
     *
     * @param property 字段
     * @param val      值
     * @return children
     */
    Children likeLeft(R property, String val);


    /**
     * LIKE '值%'
     *
     * @param property 字段
     * @param val      值
     * @return children
     */
    Children likeRight(R property, String val);


    /**
     * 包含字符串
     *
     * @param property
     * @param val
     * @return
     */
    Children contains(R property, String val);



}

 